package com.company.behavioral.interparter_pattern.terminal_expression;

import com.company.behavioral.interparter_pattern.abstract_expression.AbstractNode;

/**
 * 动作结点
 * @ClassName DistanceNode
 * @Author tiezheng.han
 * @Date 2020/9/4 10:49
 **/
public class DistanceNode extends AbstractNode {

    private String distance;

    public DistanceNode(String distance) {
        this.distance = distance;
    }

    /**
     * 距离表达式的解释操作
     * @return
     */
    @Override
    public String interpret() {
        return this.distance;
    }
}
